 #!/bin/bash
	
	echo ">>>>>>>>> build x264 for android arm-v7a <<<<<<<<"
	
	#NDK位置，编译结果保存位置
	export NDK=$ANDROID_NDK
	export TARGET=./armeabi-v7a
	#C、C++编译器所在位置
	export PLATFORM=linux-x86_64
	export TOOLCHAIN=$NDK/toolchains/llvm/prebuilt/$PLATFORM
	export CC=$TOOLCHAIN/bin/armv7a-linux-androideabi21-clang
	export CXX=$TOOLCHAIN/bin/armv7a-linux-androideabi21-clang++
	
	
	function build
	{
	echo ">>>>>>>> build start <<<<<<<<<<"
	
	 ./configure \
  --with-pic \
  --with-sysroot=$TOOLCHAIN/sysroot \
  --host=arm-linux \
  --enable-static \
  --prefix=$TARGET/lpng \
  --enable-arm-neon="yes" \
  --disable-shared \
  --disable-shared
	
	
	
	
	
	
	
	
	#make clean
	#make
	#make install
	
	echo ">>>>>> build done <<<<<<"
	}
	
	build
 